var process = require('child_process');
var exec = process.exec;
var execSync = process.execSync;

var cmd1 = 'npm -version';
exec(cmd1, function(err) {
    if (err) throw err;
    console.log("exec callback");
});
console.log("exec finished");

// var cmd2 = console.log("execSync command");
// var result = execSync(test());
// console.log(result);
console.log("execSync finished");

function test() {
    let i;
    for (i = 0; i < 10000000; ++i) {}
    return i;
}
test()